package com.mao.demo2;

public class SilverCard extends Card{
    public SilverCard(String cardID, String name, String phone, double money) {
        super(cardID, name, phone, money);
    }

    @Override
    public void consume(double money) {
        System.out.println("您当前银卡的消费：" + money);
        System.out.println("优惠后的价格：" + money * 0.9);
        if(getMoney() < money*0.9)
        {
            System.out.println("您的余额不足，请充值");
            return;
        }
        setMoney(getMoney() - money * 0.9);
    }
}
